ruby:
  debug_files = app.debug_files.where(device_type: value).order(id: :desc)

.tab-pane id="tab-#{app.id}-#{value.downcase}" class="#{i == 0 ? 'active' : ''}"
  - if debug_files.count > 0
    table.table.table-hover
      - debug_files.each do |debug_file|
        tr
          td
            .debug-file-section id="debug-file-info-#{debug_file.id}" data-app-name="#{app.name}"
              .debug-file-section-header
                .debug-file-toggle data-id="#{debug_file.id}"
                  h3.debug-file-section-title
                    - unless debug_file.build_version.blank?
                      span.debug-file-version
                        = debug_file.release_version
                    span.debug-file-device-type
                      = device_name(debug_file.device_type)
                  .debug-file-build-version
                    - if debug_file.build_version.blank?
                      | 后台任务正在解析中，请稍候刷新。
                    - else
                      | 构建版本：
                      = debug_file.build_version

                .debug-file-section-size
                  - if debug_file.has_file?
                    a.btn.btn-icon.btn-sm.btn-success.btn-flat href="#{debug_file.file_url}" target="_blank"
                      i.fas.fa-download
                      | 下载 (
                      = number_to_human_size(debug_file.file.size)
                      | )
                  - else
                    button.btn.btn-secondary.btn-icon.btn-sm.btn-flat.disabled
                      i.fas.fa-ghost
                      | 遗失文件无法下载
                  - if user_signed_in?
                    button.btn.btn-icon.btn-sm.btn-danger.btn-flat.destroy-debug-file data-id="#{debug_file.id}" data-url="#{debug_file_path(debug_file)}" data-toggle="modal"
                      i.fas.fa-trash-alt
                      | 删除
                  .div.text-center
                    small style="color: #999"
                      | 上传于
                      = time_ago_in_words(debug_file.created_at)

              == render 'metadata', debug_file: debug_file
  - else
    .alert
      | 还没有上传任何 Debug File，点击右上角上传一个吧。